package com.easylinkin.linkappapi.crane.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.easylinkin.linkappapi.crane.typehandler.WorkTimeListHandler;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 吊车垂直面保护区表
 *
 * @author xy
 * @since 2025-06-16
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "rail_crane_vertical_protection_area", autoResultMap = true)
public class CraneVerticalProtectionArea implements Serializable{
    private static final long serialVersionUID=1L;

    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO, value = "id_")
    private Long id;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id_")
    private String tenantId;

    /**
     * 区域名称
     */
    @TableField(value = "region_name_")
    private String regionName;

    /**
     * 所属工点
     */
    @TableField(value = "work_station_id_")
    private String workStationId;

    /**
     * 所属工点名称
     */
    @TableField(exist = false)
    private String workStationName;

    /**
     * 作业时间
     */
    @TableField(value = "work_time_", typeHandler = WorkTimeListHandler.class)
    private List<WorkTime> workTimeList;

    /**
     * 区域位置
     */
    @TableField(value = "location_")
    private String location;

    /**
     * 是否启用 0-不启用，1-启用
     */
    @TableField(value = "enabled_flag_")
    private Integer enabledFlag;

    /**
     * 删除状态 0：未删除 1：已删除
     */
    @TableField(value = "delete_state")
    @TableLogic(value = "0", delval = "1")
    private Integer deleteState;

    /**
     * 创建人id
     */
    @TableField(value = "create_id_")
    private Long createId;

    /**
     * 创建日期
     */
    @TableField(value = "create_time_")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField(value = "modify_id_")
    private Long modifyId;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time_")
    private Date modifyTime;

    /**
     * 备注
     */
    @TableField(value = "remark_")
    private String remark;

    /**
     * 关键字
     */
    @TableField(exist = false)
    private String keyword;

    /**
     * 距离中心点距离
     */
    @TableField(exist = false)
    private double distance;
    /**
     * 中点坐标
     */
    @TableField(exist = false)
    private double[] middlePoint;
    /**
     * 是否有警报 true-有，false-无
     */
    @TableField(value = "alarm_flag_")
    private Boolean alarmFlag;

}
